{template 'yellowpage_header.html','yellowpage'}


<div class="container">
	
    
    <div class="main">
    	<div class="mod">
        	<div class="head">公司简介</div>
            <div class="body">
            	<div class="hero-unit">
                	{html_entity_decode(str_cut($introduce,500,'...'))}
                </div>
            </div>
        </div>
        
        
        
        
            <div class="mod">
            	<div class="head">最新消息</div>
                	
                    <style type="text/css">
						.ns .item{
							margin:0 0 20px 0; clear:both; height:auto; overflow:hidden;
						}
						.ns .item .title{
							font-size:14px;
						}
						.ns .item .desc .thumb{
							 float: left;
    						 margin: 0 10px 5px 0;
						}
					</style>
                	<ul class="body ns">
                    {get sql="SELECT * FROM `table_yellowpage_news` WHERE `userid`='$userid' AND status=99 ORDER BY id DESC" rows="10"}
                    <li class="item">
                    	<div class="title"><a href="{url($r[url])}" title="{$r[title]}">{str_cut($r[title],48,'')}</a></div>
                        <p>{date('Y-m-d',$r['updatetime'])}</p>
                    	<div class="desc">
                        	{if $r[thumb]}
                            	<div class="thumb">
                                <a href="{url($r[url])}" title="{$r[title]}"><img src="{thumb($r[thumb],120,120)}"/></a>
                                </div>
                            {/if}
                        	{php //html_entity_decode(str_cut(trim($r[content]),300,'...'))}
                            {str_cut(strip_tags(trim($r[content])),450,'...')}
                        </div>
                    </li>
                    {/get}
                  </ul>
                
            </div>
            
            
            <div class="mod">
            	<div class="head">最新招聘</div>
                <div class="body">
              
                    {get sql="SELECT id,title,content,userid,updatetime,employ,url FROM `table_yellowpage_job` WHERE userid='$userid' AND status=99 ORDER BY id DESC" rows="5" urlrule="$urlrule"}
                    <p><span>{date('Y年m月d日',$r[updatetime])}</span> &nbsp;<a href="{url($r[url])}">{$r[title]}(<font color="red">{$r['employ']}</font>)</a></p>
                    {/get}
                  
                </div>
            </div>
            
            
            
            
        
        
        <div class="mod">
        	<div class="head">详细介绍</div>
            <div class="body">
                <p>企业类型：{php echo $genre ? $genre : '暂无'}</p>
                <p>主营行业：{php echo $catids ? substr($catids,1,-1) : '暂无'}</p>
                <p>经营模式：{php echo $pattern ? $pattern : '暂无'}</p>
                <p>年营业额：{php echo $turnover ? $turnover : '暂无'}</p>
                <p>员工人数：{php echo $employnum ? $employnum : '0'} 人</p>
                <p>公司注册地：{php echo $areaname ? $areaname : '暂无'}</p>
                <p>公司成立时间：{php echo $establishtime ? $establishtime : '暂无'}</p>
                <p>联系方式：{php echo $address ? $address : '暂无'}</p>
                <p>主营产品或服务：{php echo $products ? $products : '暂无'}</p>
            </div>
        </div>
         
    </div>
    
    <div class="aside">
        	
            <div class="mod">
            	<div class="body"> 
                	<div class="">
                        <img class="thumbnail left" src="{php echo $logo ? thumb($logo,200,'') : 'misc/nopic.gif'}" style="margin:0 20px 10px 0;"/>
                        {html_entity_decode(str_cut($introduce,150,'...'))}<br/><br/>
                        <a href="{url("?module=space&file=fans&action=add&userid=$userid")}" class="button"><i class="icon-heart"></i>我喜欢</a>
                        {php $mystats = $db->get_one("select `hits` from table_yellowpage_stats where userid = $userid")}
                        <!--<h4>已访问{$mystats[hits]}次</h4>-->
                    </div>
                </div>
            </div>
            
            {if $m_user}
            <div class="mod">
            	<div class="head">热点导航</div>
                <div class="body">
                	<ul>
                    {loop $m_user $ms}
                      <li><a href="{$ms[url]}">{$ms[catname]}</a></li>
                    {/loop}
                    </ul>
                </div>
            </div>
            {/if}
            
            
            
          <div class="mod" style=" display:none">
            <div class="head">喜欢该企业的成员</div>
            <ul class="body users">
            {get sql="select `fansid` from table_member m,table_member_fans f where m.userid = f.userid and f.userid = $userid" rows="16"}
            <li {if $n%4==1} class="clear" {/if}>
             <a href="{url("?module=space&userid=$r[fansid]")}" title="{username($r[fansid])}"><img src="{thumb(avatar($r[fansid]),40,40)}" target="_blank" width="40" height="40"/></a>
             <br/><a href="{url("?module=space&userid=$r[fansid]")}">{username($r[fansid])}</a>
            </li>
          {/get}
          </ul>
        </div>
        
        
        <div class="mod">
            <div class="head"><span>会员列表</span><!--<a href="{url("?module=group&action=member&groupid=$groupid")}">更多</a>--></div>
            <ul class="body users">
            {php //get sql="select * from table_group_member where groupid = $groupid " rows="16"}
            {get sql="select * from table_member order by rand()" rows="16"}
            <li {if $n%4==1} class="clear" {/if}>
             <a href="{url("?module=space&userid=$r[userid]")}" title="{$r[username]}"><img src="{thumb(avatar($r[userid]),40,40)}" alt="{$r[username]}"  target="_blank" width="40" height="40"/></a>
             <br/><a href="{url("?module=space&userid=$r[userid]")}">{$r[username]}</a>
             <!--<br/><a href="./index.php?module=space&file=fans&action=add&userid={$r[userid]}">(关注TA)</a>-->
            </li>
          {/get}
          </ul>
        </div>
        
        
        <div class="mod">
            <div class="head"><span>喜欢该企业的成员也喜欢</span></div>
            <ul class="body users">
            {get sql="select userid,companyname,logo from table_member_company where logo <> '' order by rand()" rows="16"}
            <li {if $n%4==1} class="clear" {/if}>
             <a href="{url("?module=yellowpage&userid=$r[userid]")}" title="{$r[companyname]}">
             <img src="{php echo $r[logo] ? thumb($r[logo],72,'') : thumb('misc/nopic.gif',72,'')}" 
             alt="{$r[companyname]}"  target="_blank" width="40" height="40"/></a>
             <br/><a href="{url("?module=yellowpage&userid=$r[userid]")}">{str_cut($r[companyname],15,'')}</a><br/>&nbsp;({rand(100,500)})
            </li>
          {/get}
          </ul>
        </div>
        
        <div class="mod">
            <div class="head">永久链接</div>
            <div class="body users">
          		本页永久链接:<a href="{url("?module=yellowpage&userid=$userid")}">{url("?module=yellowpage&userid=$userid")}</a>
            </div>
        </div>
        
            
            <div class="mod">
                <div class="head">最新产品</div>
                <div class="body">
                    <ul>
                    {get sql="SELECT id,title,content,userid,thumb,price,quantifier,url FROM `table_yellowpage_product` WHERE userid='$userid' AND status=99 ORDER BY id DESC" rows="6"}
                    <li><a href="{url($r[url])}"><img src="{thumb($r[thumb],98,98)}" alt="{$r[title]}" width="100" height="100"/>{$r[title]}</a><strong>{if $r['price']}￥{$r[price]}元/{$r[quantifier]}{else}<a href="{url("?module=$module&action=guestbook&userid=$userid")}">我要询价</a>{/if}</strong></li>
                    {/get}
                    </ul>
                </div>
            </div>
            
            
            <div class="mod">
            	<div class="head">站内搜索</div>
                <div class="body">
                	<form class="box" action="{$M['url']}web/query.php">
                      <input type="text" name="q" size="16"/><input name="search" type="submit" id="search" value="搜索"/><br/>
                      <input type="radio" name="type" checked="checked" value="product"/>商品<input type="radio" name="type" value="buy"/>商机<input value="news" type="radio" name="type"/>新闻<input type="hidden" value="search" name="action" /><input name="userid" value="{$userid}" type="hidden" />
                    </form>
                </div>
            </div>
            
            <div class="mod">
            	<img src="{SKIN_PATH}skin/adsense/250x250.jpg"/>
            </div>
            
            
        </div>
        <p class="clear"></p>
</div>

{template 'yellowpage_footer.html','yellowpage'} 